Skip to content

fix(pilotctl): surface app store + missing commands in help and context#332

Merged
TeoSlayer merged 4 commits into
mainfrom
pilotctl-help-audit
Jun 25, 2026
Merged

fix(pilotctl): surface app store + missing commands in help and context#332
TeoSlayer merged 4 commits into
mainfrom
pilotctl-help-audit

Conversation

@Alexgodoroja

Copy link
Copy Markdown
Collaborator

Problem

pilotctl help drifted from the actual command dispatch table. Three surfaces were out of sync:

  • usage() (bare pilotctl / -h / --help) listed set-tags, clear-tags, and gateway as core commands — but they are extras-gated and error out when invoked that way (error: set-tags is not in the core CLI).
  • usage() and pilotctl context omitted the entire appstore family (15 subcommands) plus review, verify, recovery, prefer-direct, trusted, and any pointer to the extras tier. The MOTD tells users to run pilotctl appstore catalogue, yet --help never mentioned appstore.
  • verify, recovery, prefer-direct, quickstart had no per-command --help (fell back to "No specific help").

Changes

  • usage() — remove the extras-gated entries from the core listing; add App Store, Updates, and Identity & recovery sections; add trusted and prefer-direct; add an operator/admin pointer to pilotctl extras / pilotctl context. Gateway/tags now shown as pilotctl extras ….
  • contextCatalog() — bump schema to v1.4; add a top-level app_store section (all 15 subcommands) and core entries for quickstart, update, updates, skills, review, verify, recovery, prefer-direct, trusted.
  • commandHelp — add entries for verify, recovery, prefer-direct, quickstart.

No behavior changes — help/discovery text only.

Verification

  • gofmt, go vet ./cmd/pilotctl, go build ./cmd/pilotctl, go test ./cmd/pilotctl — all pass.
  • Ran the built binary: --help now lists the app store + all first-class commands and no longer shows set-tags/gateway as core; pilotctl context reports version 1.4 with the app_store block; pilotctl verify|recovery|prefer-direct|quickstart --help all resolve.

pilotctl help (usage), the JSON `context` catalog, and per-command
--help had drifted from the dispatch table:

- usage() listed set-tags/clear-tags/gateway as core commands, but they
  are extras-gated and error out when invoked that way.
- usage() and context omitted the entire `appstore` family plus review,
  verify, recovery, prefer-direct, trusted, and the extras tier.
- verify/recovery/prefer-direct/quickstart had no per-command help.

Realign all three surfaces with the actual commands:

- usage(): drop the extras-gated entries from core; add App Store,
  Updates, and Identity & recovery sections, trusted/prefer-direct, and
  an operator/admin pointer to `pilotctl extras` / `pilotctl context`.
- context: bump to v1.4, add an `app_store` section (15 subcommands) and
  core entries for quickstart/update/updates/skills/review/verify/
  recovery/prefer-direct/trusted.
- commandHelp: add entries for verify/recovery/prefer-direct/quickstart.

go build, go vet, and go test ./cmd/pilotctl all pass.
@Alexgodoroja Alexgodoroja requested a review from TeoSlayer as a code owner June 24, 2026 23:03
Alex Godoroja and others added 3 commits June 24, 2026 16:05
IPCServer.Start flipped the process-global syscall.Umask around
net.Listen to create the socket at 0600. umask is process-wide rather
than goroutine-scoped, so under parallel tests a concurrent t.TempDir()
inherited the restrictive 0177 mask and its nested mkdir failed with
"permission denied", flaking the pkg/daemon suite on both runners.

Bind the socket inside a freshly-created private 0700 staging dir,
chmod it 0600, then atomically rename it onto the published path. This
closes the same TOCTOU window without ever touching the global umask.
Comment thread pkg/daemon/ipc.go
return fmt.Errorf("chmod socket %s: %w", s.socketPath, err)
}
if err := os.Rename(stagePath, s.socketPath); err != nil {
ln.Close()
@TeoSlayer TeoSlayer merged commit 5ab963f into main Jun 25, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants